import React from 'react';
export default class Coupon extends React.Component{
    constructor(props){
        super();
        if(props.fill===undefined){
            this.state={
                fill:"#5393eb"
            }
        }
        else{
            this.state={
                fill:props.fill
            }
        }
        
    }
    UNSAFE_componentWillReceiveProps(prop){
        if(prop.fill===undefined||prop.fill===""){
            this.setState({
                fill:"#5393eb"
            })
        }
        else{
            this.setState({
                fill:prop.fill

            })
        }
    }
    render(){
        return(
            <svg xmlns="http://www.w3.org/2000/svg" width="22.989" height="19.038" viewBox="0 0 22.989 19.038">
            <defs>
            </defs>
            <g id="优惠券_2_" data-name="优惠券 (2)" transform="translate(0 -87.936)">
                <path id="路径_3507" data-name="路径 3507" fill={this.state.fill} class="cls-1" d="M335.917,93.56l-.92-.92a2.581,2.581,0,0,1-1.161.276,2.546,2.546,0,0,1-2.552-2.552,2.618,2.618,0,0,1,.276-1.161l-.517-.517a2.546,2.546,0,0,0-3.609,0l-4.874,4.885Z" transform="translate(-315.318)"/>
                <path id="路径_3508" data-name="路径 3508" fill={this.state.fill} class="cls-2" d="M160.041,88.914a2.561,2.561,0,0,0-3.1.379l-4.874,4.874h2.724Z" transform="translate(-148.65 -0.607)"/>
                <path id="路径_3509" data-name="路径 3509" fill={this.state.fill} class="cls-1" d="M22.989,370.357v-.7a2.546,2.546,0,0,0-2.552-2.552H2.552A2.553,2.553,0,0,0,0,369.656v.7a3.193,3.193,0,0,1,2.552,3.127A3.205,3.205,0,0,1,0,376.622v.7a2.546,2.546,0,0,0,2.552,2.552H20.426a2.546,2.546,0,0,0,2.552-2.552v-.7a3.2,3.2,0,0,1,.011-6.265ZM5.115,379.415H4.483v-1.276h.632Zm0-2.115H4.483v-1.276h.632Zm0-2.115H4.483v-1.276h.632Zm0-2.115H4.483v-1.276h.632Zm0-2.115H4.483v-1.276h.632Zm0-2.115H4.483v-1.276h.632Zm10.207,4.632v.655H13.4v1.253h1.92v.644H13.4v1.943H12.1v-1.943H10.219v-.644H12.1v-1.253H10.219v-.655H11.9l-2.012-3.529h1.1c.954,1.747,1.54,2.862,1.747,3.322h.023l1.747-3.322h1.046l-2.115,3.517h1.885v.012Z" transform="translate(0 -272.901)"/>
            </g>
            </svg>

            );
    }
}